package org.ling.xuan.channel;


import org.ling.xuan.context.CheckChannelContext;
import org.ling.xuan.context.CheckPipelineContext;

public class FileContentCheckChannel extends CheckChannel<CheckChannelContext, CheckPipelineContext> {

    @Override
    public CheckChannelContext getContext(CheckPipelineContext pipeContext) {
        return new CheckChannelContext();
    }

    @Override
    public <R extends CheckPipelineContext> boolean match(R pipeContext, CheckChannelContext channelContext) {
        return pipeContext.getFilePath().endsWith(".java")||pipeContext.getFilePath().endsWith(".sql");
    }
}
